#include "header.h"
main()
{
      int n,m;
      int a1[]={1,2,3,4};
      int a2[]={4,3,2,1};
      int a3[]={1,1,2,2};
      int a4[]={1,1};
      int a5[]={1};
      
      int b1[]={1};
      int b2[]={1, 2};
      int b3[]={1, 2, 3};
      int b4[]={1, 2, 3, 4};
      int b5[]={3, 3, 4, 4};
      int b6[]={3, 2, 3, 4};
      int b7[]={4, 1, 2, 3};
      int b8[]={1, 1, 8, 9, 11, 13};
      
      char c[]={'a','b','c'};
      int c1[]={0,4};
      int c2[]={0,3};
      int c3[]={0,2};
      int c4[]={0,1};
      int c5[]={1,3};
      int c6[]={1,2};
      int c7[]={1,1};
      int c8[]={1,0};
      int c9[]={2,2};
      int c10[]={2,1};
      int c11[]={3,1};
    printf("cau 1\n");  
      n=LENGHT(a1);
      bai1(a1);
      n=LENGHT(a2);
      bai1(a2);
      n=LENGHT(a3);
      bai1(a3);
      n=LENGHT(a4);
      bai1(a4);
      n=LENGHT(a5);
      bai1(a5);
      
      printf("\n\n cau 2\n");
      
      n=LENGHT(b1); 
      bai2(b1);
      n=LENGHT(b2);
      bai2(b2);
      n=LENGHT(b3);
      bai2(b3);
      n=LENGHT(b4);
      bai2(b4);
      n=LENGHT(b5);
      bai2(b5);
      n=LENGHT(b6);
      bai2(b6);
      n=LENGHT(b7);
      bai2(b7);
      n=LENGHT(b8);
      bai2(b8);
      
      printf("\n\n cau 3\n");
     
      n=LENGHT(c);
      bai3(c,0,4,n);
      
      bai3(c,0,3,n);
      bai3(c,0,2,n);
      bai3(c,0,1,n);
      bai3(c,1,3,n);
      bai3(c,1,2,n);
      bai3(c,1,1,n);
      bai3(c,1,0,n);
      bai3(c,2,2,n);
      bai3(c,2,1,n);
      bai3(c,3,1,n);
getch();
}
